class ApiException implements Exception {
  String message;
  int code;
  ApiException({required this.code, required this.message});
  Map<String, dynamic> toJson() => {"msg": message, "code": code};
}

enum EXP {
  correct(200, "correct"),
  tokenExpire(-3, "tokenExpire"),
  error_api(1, "api error"),
  error_500(500, "error"),
  ;

  final String title;
  final int code;

  const EXP(this.code, this.title);
}
